<template>
	<view>
		<u-sticky>
			<u-search placeholder="请输入门店名称" :clearabled="true" v-model="keyword" border-color="#606266" @custom="search" @search="search"></u-search>
		</u-sticky>
		<u-table>
			<u-tr class="u-tr">
				<u-th class="u-th" width="20%">门店</u-th>
				<u-th class="u-th" width="20%">巷道</u-th>
				<u-th class="u-th" width="10%">总托</u-th>
				<u-th class="u-th" width="10%">待拣</u-th>
				<u-th class="u-th" width="20%">待质</u-th>
				<u-th class="u-th" width="20%">甩货</u-th>
				
			</u-tr>
			<u-tr class="u-tr" v-for="(item,index) in dataList" :key="index">
				<u-td class="u-td" width="20%">{{item.getUnit}}</u-td>
				<u-td class="u-td" width="20%">{{item.stockPort}}</u-td>
				<u-td class="u-td" width="10%">{{item.ztCnt}}</u-td>
				<u-td class="u-td" width="10%">{{item.jhzCnt}}</u-td>
				<u-td class="u-td" width="20%">{{item.zjzCnt}}</u-td>
				<u-td class="u-td" width="20%">{{item.shCnt}}</u-td>
			</u-tr>
		</u-table>
	</view>
</template>

<script>
export default {
	data() {
		return {
			keyword:"",
			dataList:[],
		}
	},
	onShow() {
		this.getDataList();
		this.refresh();
	},
	onPullDownRefresh() {
		this.getDataList();
		uni.stopPullDownRefresh()
	},
	methods: {
		getDataList(){
			if(this.keyword == '' || this.keyword == null){
				uni.showToast({
					title: "请输入门店名称",
					icon: 'none'
				})
				return
			}
			this.$http.post('/rest/transport/goodQueryList',{
			},{
				params: {
					getUnit:this.keyword
				},
				header: {
					'Authorization' :uni.getStorageSync('token'),
				}
			}).then(res => {
				this.dataList = res.data.data
			})
		},
		search(e){
			this.getDataList();
		},
	}
}
</script>

<style>
</style>